home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / ib.750 < prev    next >
Text File  |  1992-02-06  |  1KB  |  48 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Ohlfs;\f2\fswiss Helvetica;}
  2. \paperw13040
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 loadable palettes IB\
  8. \
  9. Q:  I've created a loadable palette for Interface Builder according to the instructions in the release notes.  I then created an inspector, and wrote all of the appropriate routines.  Now, I'm trying to use this from within Interface Builder.  If I drag my object from the palette, and then modify some of its attributes and select OK, the inspector doesn't remember the settings when I select the object again at a later time.  Why?\
  10. \
  11. A:  This isn't documented, but within the 
  12. \b ok:
  13. \b0\i sender
  14. \i0  method for your inspector object, you should call the 
  15. \b ok:
  16. \b0  method for its super class, and return that value. Here's a template for your 
  17. \b ok:
  18. \b0  method.\
  19. \
  20.  
  21. \f1\fs22     ok:sender\
  22.     \{\
  23.         /* do a bunch of stuff in here */\
  24.         return [super ok:sender];\
  25.     \}\
  26.  
  27. \f0\fs28\fc0 \
  28. This is also true for the 
  29. \b revert:
  30. \b0  method.  You should call the super class's 
  31. \b revert:
  32. \b0  method from within the object's.  Like this:\
  33. \
  34.  
  35. \f1\fs22     revert:sender\
  36.     \{\
  37.         /* do a bunch of stuff in here */\
  38.         return [super revert:sender];\
  39.     \}\
  40.  
  41. \f0\fs28 \
  42. QA750\
  43. \
  44. Not valid for 1.0\
  45. Valid for 2.0\
  46. \
  47.  
  48.